package csel.model.entity;

import csel.model.CharacterStats;
import csel.model.CharacterStatsHolder;
import csel.model.DamageTypes;
import csel.model.items.EquippableItem;
import csel.model.items.UseableItem;
import csel.model.skills.*;

public class Summoner implements Occupation
{
	public Summoner()
	{

	}

	@Override
	public void setInitialResistances(CharacterStatsHolder cs)
	{
		cs.setResistance(DamageTypes.Direct, new Integer(0));
		cs.setResistance(DamageTypes.Electrical, new Integer(25));
		cs.setResistance(DamageTypes.Ranged, new Integer(5));
		cs.setResistance(DamageTypes.Sneaky, new Integer(0));
		cs.setResistance(DamageTypes.Tiger, new Integer(-1000));
	}

	@Override
	public CharacterStatsHolder getInitialStats()
	{
		CharacterStatsHolder ch = new CharacterStatsHolder();

		
		ch.setStat(CharacterStats.Agility, 8);
		ch.setStat(CharacterStats.Strength, 10);
		ch.setStat(CharacterStats.Intellect, 26);
		ch.setStat(CharacterStats.Hardiness, 10);
		ch.setStat(CharacterStats.Experience, 0);
		ch.setStat(CharacterStats.Speed, 17);
		ch.setStat(CharacterStats.Damage, 0);
		ch.setStat(CharacterStats.Lives, 5);

		return ch;
	}


	public void accept(OccupationSkillGetterVisitor ov, int level, Character c)
	{
		switch (level)
		{
		case 1:
			/* all classes */
			ov.visitPassiveSkill(new Bargain(c));
			ov.visitNonRangedSkill(new BindWounds(c));
			//ov.visitPassiveSkill(new Observation(c));
			/* summoner-specific */
			ov.visitPassiveSkill(new Staff(c));
			ov.visitRangedSkill(new FireBall(c));
			c.setFlexBucks(10000);
		}
			
	}

	public String toString()
	{
		return "Summoner";
	}

	@Override
	public Inventory<EquippableItem> getStartingInventoryEquippable()
	{
		Inventory<EquippableItem> inventoryEquippable = new Inventory<EquippableItem>();
		
		return inventoryEquippable;
	}

	@Override
	public Inventory<UseableItem> getStartingInventoryUseable()
	{
		Inventory<UseableItem> inventoryUseable = new Inventory<UseableItem>();
		
		return inventoryUseable;
	}
}
